package com.example.demo.design.memo.three;

import java.util.ArrayList;

/**
 * @Author: liull
 * @Description:
 * @Date: Created in 17:07 2021/4/2
 * @Modified By:
 */
public class MementoCaretaker {

    private ArrayList<ChessmanMemento> mementoList = new ArrayList<>();

    // public ArrayList<ChessmanMemento> getMementoList() {
    // return mementoList;
    // }
    //
    // public void setMementoList(ArrayList<ChessmanMemento> mementoList) {
    // this.mementoList = mementoList;
    // }

    public void setMemento(ChessmanMemento memento) {
        mementoList.add(memento);
    }

    public ChessmanMemento getMemento(int i) {
        return mementoList.get(i);
    }
}
